package com.hunlian.makelove.net.api;

import android.content.Context;

import com.hunlian.makelove.common.Printout;
import com.hunlian.makelove.net.ServiceInterfaceDef;
import com.hunlian.makelove.net.InterfaceServiceVisit;
import com.hunlian.makelove.net.ResponseCallbackListener;
import com.hunlian.makelove.net.StringResponseCallbackListener;


/**
 * 同意/拒绝对方查看对方电话
 * @author zealjiang
 * @time 2015年11月23日下午2:08:24
 */
public class AgreeLPServiceVisit extends InterfaceServiceVisit {
	// 登录接口Id


	public AgreeLPServiceVisit(Context context) {
		super(context);

		setFunctionId(ServiceInterfaceDef.FUNC_ID_AGREE_LOOK_PHONE);
	}

	// 填充参数
	public void setParamters(String userId,String oppositeUserId,String isAgree) {
		paramterData.put("userId", userId);
		paramterData.put("oppositeUserId", oppositeUserId);
		paramterData.put("isAgree", isAgree);
	}

	public void getResult(final ResponseCallbackListener<String,Object> listener) {
		doPost(getParamter(), new StringResponseCallbackListener() {
			@Override
			public void onSuccess(String data) {
				Printout.println("同意/拒绝对方查看对方电话:"+data);
		
		        
				if(listener != null){
					listener.onSuccess(data);
				}
			}

			@Override
			public void onFailure(String errCode, String errMessage,String obj) {
				if (listener != null) {
					listener.onFailure(errCode, errMessage,obj);
				}
			}
		});
	}


}
